﻿
@{
    ViewBag.Title = "科室登录";
    //Layout = "~/Views/Shared/_EvalLayout.cshtml";
    Layout = null;
}

@model kzjd.rycp.WebApp.Models.EvalLoginModel


<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - 大机段管理人员年度测评系统</title>
    @Styles.Render("~/Content/css")
    <link rel="stylesheet" type="text/css" href="@Href("~/")Content/jquery-ui/jquery-ui-custom-1.11.2.css?ver=@WebApp.BLL.CommonStr.Ver">
    <link rel="stylesheet" type="text/css" href="@Href("~/")Content/jquery-fileupload/css/jquery.fileupload.css?ver=@WebApp.BLL.CommonStr.Ver">
    <link rel="stylesheet" type="text/css" href="@Href("~/")Content/jquery-fileupload/css/jquery.fileupload-ui.css?ver=@WebApp.BLL.CommonStr.Ver">
    <link rel="stylesheet" type="text/css" href="@Href("~/")Content/bootstrap-rewrite.css?ver=@WebApp.BLL.CommonStr.Ver">
    <link rel="stylesheet" type="text/css" href="@Href("~/")Content/website.css?ver=@WebApp.BLL.CommonStr.Ver">
    <link rel="stylesheet" type="text/css" href="@Href("~/")Content/login.css?ver=@WebApp.BLL.CommonStr.Ver">
    @Scripts.Render("~/bundles/modernizr")
    <style type="text/css">
        body {
            padding-top: 20px;
        }

        /*.bgimage {
            background: url(/Content/images/bg.jpg) no-repeat;
            background-size: 100%;
            height: 580px;
            border-radius: 10px;
            overflow: hidden;
            position: relative;
        }*/
        .bgimage{
            position:absolute; top:0;left:0; z-index:9;
        }
        .bgimage img{
            border-radius:10px;
        }

        .right-button {
            position: absolute;
            right: 20px;
            top: 20px;
            width: 220px;
            z-index:99;
        }
    </style>
</head>
<body>
    <form id="loginForm" class="form-horizontal" method="post">
        <div class="container-fluid body-content">
            <div class="w1220 " style="position:relative;height:600px;">
                <div class="bgimage">
                    <img src="~/Content/images/bg.jpg" style="width:1220px; " />
                </div>
                <div class="right-button" style="margin: 20px 0;">
                    <div class="row" style="margin-bottom: 20px;">
                        <div class="col-xs-12">
                            <label>
                                测评科室
                            </label>
                            @Html.DropDownList("Dept_id", Model.Dept_id, ViewBag.DeptSelectList as SelectList, "", new { @class = "form-control datafield" })
                        </div>
                    </div>
                    <div class="row" style="margin-bottom: 20px;">
                        <div class="col-xs-12">
                            <label>测评人序号</label>
                            <select id="Member" name="Member" class="form-control datafield"></select>
                        </div>
                    </div>
                    <div class="row" style="margin-bottom: 30px;">
                        <div class="col-xs-12">
                            <label>科室密码</label>
                            @Html.Password("Password", "", new { @class = "form-control datafield", autocomplete = "off", placeholder = "请输入密码" })
                        </div>
                    </div>
                    <div class="row" style="margin-bottom: 30px;">
                        <div class="col-xs-12">
                            <a href="#none" id="submitOfficeDept" class="btn btn-lg btn-primary" style="width:100%;">机关科室测评</a>
                        </div>
                    </div>
                    <div class="row" style="margin-bottom: 30px;">
                        <div class="col-xs-12">
                            <a href="#none" id="submitOfficeMember" class="btn btn-lg btn-primary" style="width:100%;">机关管理人员测评</a>
                        </div>
                    </div>
                    <div class="row" style="margin-bottom: 30px;">
                        <div class="col-xs-12">
                            <a href="#none" id="submitWorkerMember" class="btn btn-lg btn-success" style="width:100%;">本车间管理人员测评</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <input type="hidden" id="ActionUrl" name="ActionUrl" value="" />
    </form>

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/bootstrap")

    <script type="text/javascript" src="@Href("~/")Content/jquery-fileupload/js/vendor/jquery.ui.widget.js"></script>
    <script type="text/javascript" src="@Href("~/")Content/jquery-fileupload/js/jquery.iframe-transport.js"></script>
    <script type="text/javascript" src="@Href("~/")Content/jquery-fileupload/js/jquery.fileupload.js"></script>
    <script type="text/javascript" src="@Href("~/")Content/layer/layer.js"></script>
    <script type="text/javascript">
        var baseurl = "@Href("~/")";
    </script>
    <script type="text/javascript" src="~/Scripts/app/app.jquey-ui.js?ver=@WebApp.BLL.CommonStr.Ver"></script>
    <script type="text/javascript" src="~/Scripts/app/app.eval.core.js?ver=@WebApp.BLL.CommonStr.Ver"></script>
    <script type="text/javascript">
        var result = "@Model.LoginResult";
        var message = "@Model.ErrorMessage";
        var deptMembers = @Html.Raw(ViewBag.DeptMembers);

        $(document).ready(function () {
            if (result == "-1") {
                alert(message);
            }

            $("#submitOfficeDept").click(function(){
                $("#ActionUrl").val("@Href("~")Eval/OfficeDept");
                $("#loginForm").submit();
            });
            $("#submitOfficeMember").click(function(){
                $("#ActionUrl").val("@Href("~")Eval/OfficeMember");
                $("#loginForm").submit();
            });
            $("#submitWorkerMember").click(function(){
                $("#ActionUrl").val("@Href("~")Eval/WorkerMember");
                $("#loginForm").submit();
            });

            $("#Dept_id").change(function(){
                var deptId = $(this).val();
                var members = 0;
                for(var i=0;i<deptMembers.length;i++){
                    if(deptMembers[i].Eval_dept_id == deptId){
                        members = deptMembers[i].Requireusers;
                    }
                }
                $("#Member").find("option").remove();
                for(var i=1;i<=members;i++){
                    var $opt = $("<option>" + i + "</option>");
                    $opt.appendTo($("#Member"));
                }
            });
            $("#Dept_id").change();
        });
    </script>
</body>
</html>

@*<div class="border w1220 regbox">
        <section class="main w12">
            <div class="title">
                <a class="title1 db fl" style="width:100%;">测评科室登录</a>
            </div>
            <div class="fr tit2"><span class="arr"></span></div>
            <div style="margin: 100px auto; width: 800px;">
                <form id="loginForm" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-xs-3 control-label nopadding"><span class="form-require">*</span>选择测评科室：</label>
                        <div class="col-xs-5">
                            @Html.DropDownList("Dept_id", Model.Dept_id, ViewBag.DeptSelectList as SelectList, "", new { @class = "form-control datafield" })
                        </div>
                        <label class="col-xs-4 control-label" style="text-align:left;">
                            <span style="color:#999;"></span>
                        </label>
                    </div>
                    <div class="form-group" style="margin-top:30px;">
                        <label class="col-xs-3 control-label nopadding"><span class="form-require">*</span>测评人序号：</label>
                        <div class="col-xs-5">
                            <select id="Member" name="Member" class="form-control datafield">
                            </select>
                        </div>
                        <label class="col-xs-4 control-label" style="text-align:left;">
                            <span style="color:#999;"></span>
                        </label>
                    </div>
                    <div class="form-group" style="margin-top:30px;">
                        <label class="col-xs-3 control-label nopadding"><span class="form-require">*</span>科室密码：</label>
                        <div class="col-xs-5">
                            @Html.Password("Password", "", new { @class = "form-control datafield", autocomplete = "off", placeholder = "请输入密码" })
                        </div>
                        <label class="col-xs-4 control-label" style="text-align:left;">
                            <span style="color:#999;"></span>
                        </label>
                    </div>
                    <div class="form-group" style="margin-top:30px;">
                        <label class="col-xs-3 control-label"></label>
                        <div class="col-xs-5">
                            @if (ViewBag.CanLogin)
                            {
                                <input id="btnlogin" class="btn btn-primary" style="width: 100%; text-align:center; margin-top: 20px;" value="登录" type="submit" />
                            }
                            else
                            {
                                <input id="btnlogin" class="btn btn-primary" disabled="disabled" style="width: 100%; text-align:center; margin-top: 20px;" value="登录" type="submit" />
                                <div style="padding:10px 0; color:#ff6a00;">@ViewBag.ErrorMessage</div>
                            }
                        </div>
                    </div>
                    <input type="hidden" id="backurl" value="@ViewBag.BackUrl" />
                </form>
            </div>
        </section>
    </div>

    @section scripts{
        <script type="text/javascript">
            var result = "@Model.LoginResult";
            var message = "@Model.ErrorMessage";
            var deptMembers = @Html.Raw(ViewBag.DeptMembers);

            $(document).ready(function () {
                if (result == "-1") {
                    alert(message);
                }

                $("#Dept_id").change(function(){
                    var deptId = $(this).val();
                    var members = 0;
                    for(var i=0;i<deptMembers.length;i++){
                        if(deptMembers[i].Eval_dept_id == deptId){
                            members = deptMembers[i].Requireusers;
                        }
                    }
                    $("#Member").find("option").remove();
                    for(var i=1;i<=members;i++){
                        var $opt = $("<option>" + i + "</option>");
                        $opt.appendTo($("#Member"));
                    }
                });
                $("#Dept_id").change();
            });
        </script>
    }
*@